/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Andrea
 */
public abstract class DateUtils {
    
    public static final String dateFormat = "dd/MM/yyyy";
    public static final String dateTimeFormat = "dd/MM/yyyy HH:mm:ss";
    
    public static String convertDate(Date date) {
        SimpleDateFormat formattedDate = new SimpleDateFormat(dateFormat);
        return formattedDate.format(date);
    }
    
    public static String convertDateTime(Date date) {
        SimpleDateFormat formattedDate = new SimpleDateFormat(dateTimeFormat);
        return formattedDate.format(date);
    }
    
    public static String formatDateTime(Date date) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
    }
    
}
